﻿using System;
using System.Collections.Generic;
using System.Text;
using Exceptionless;
using Brc_PaaS.Common.Model.Basic;
using Brc_PaaS.Common.Model.Exceptionless;

namespace Brc_PaaS.Core.Exceptionless
{
    /// <summary>
    /// 日志类
    /// </summary>
    public interface ILogManager
    {
        LogModel LogConfig { get; set; }
        Dictionary<string, string> AuthDic { get; }
        /// <summary>
        /// 创建项目
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ResponseModel<EplCreateProjectResModel> CreateProjectInExceptionless(EplCreateProjectReqModel model);
        /// <summary>
        /// 创建APIKEY
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ResponseModel<EplCreateApiKeyResModel> CreateApiKeyForBusinessSystemInExceptionless(EplCreateApiKeyReqModel model);

        /// <summary>
        /// 写入异常信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        BaseResponseModel WriteExceptionToExceptionless(ElpCreateExceptionReqModel model);

        /// <summary>
        /// 写入日志信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        BaseResponseModel WriteLogToExceptionless(ElpCreateLogReqModel model);

        /// <summary>
        /// 查询异常/日志列表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ResponseModel<List<EplSearchEventResModel>> QueryEventInExceptionless(EplSearchEventReqModel model, out int total);

        /// <summary>
        /// 获取异常详细信息
        /// </summary>
        /// <param name="exceptionId"></param>
        /// <returns></returns>
        ResponseModel<EplSearchExceptionDetailModel> GetExceptionDetailFromExceptionless(string exceptionId);
        /// <summary>
        /// 登录ExceptionLess，获取Token
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ResponseModel<TokenModel> LoginEpl(EplLoginModel model);


    }
}
